From: Jyrki Gadinger Date: Thu, 24 Apr 2025 11:20:46 +0000 (+0200) Subject: fix(gui): resize share search results list dependent on required space X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~2^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=d92cca18fbdd11d16b201983cce3e237751202a6;p=nextcloud-desktop.git fix(gui): resize share search results list dependent on required space In the case there are more search results present than there's space for it, always display a scrollbar. Some QtQuick themes don't make it obvious that the list is scrollable. Signed-off-by: Jyrki Gadinger --- diff --git a/src/gui/filedetails/ShareeSearchField.qml b/src/gui/filedetails/ShareeSearchField.qml index 35c72b1ed..adda7a987 100644 --- a/src/gui/filedetails/ShareeSearchField.qml +++ b/src/gui/filedetails/ShareeSearchField.qml @@ -161,7 +161,6 @@ TextField { id: suggestionsPopup width: root.width - height: 100 y: root.height contentItem: ScrollView { @@ -169,6 +168,11 @@ TextField { clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + ScrollBar.vertical.policy: shareeListView.contentHeight > shareeListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + + // need to take the popup's padding in account for the max height + // remove bottomPadding twice to leave some space between the window border + implicitHeight: Math.min(Window.height - parent.y - parent.topPadding - parent.bottomPadding * 2, contentHeight) ListView { id: shareeListView